package com.bilibili.lambda;

public class Lambdademo1 {
    public static void main(String[] args) {
        Animal a1 = new Animal() {
            @Override
            public void cry() {
                System.out.println("🐱喵喵喵~~~");
            }
        };
        a1.cry();
        Swim s1 = ()->{
            System.out.println("学生游的贼快");
        } ;
        s1.swimming();
    }
}

abstract class Animal{
    public abstract void cry();
}


@FunctionalInterface
interface Swim {
    void swimming();
}
